<?php namespace Common\Model;
use Hdphp\Model\Model;

class TypeAtt extends Model
{
	protected $tables="TypeAtt";
	protected $validate=array(
		array('taname','required','类型名称不能为空',3,3),
		array('tvalue','required','类型值不能为空',3,3),
		);
	public function store()
	{
		if ($this->create()) {
			$this->add();
			return true;
		}
		return false;
	}
	public function edit($taid)
	{
		if ($this->create()) {
			$this->where("taid={$taid}")->save();
			return true;
		}
		return false;
	}
}